#ifndef INPUT_H
#define INPUT_H

#include <QWidget>
#include <QShowEvent>
#include <QSqlDatabase>
#include <QSqlQuery>
#include <QSqlError>

namespace Ui {
class Input;
}

class Input : public QWidget
{
    Q_OBJECT

public:
    int current_type;
    int current_id;
    QWidget *main;
    explicit Input(QWidget *parent = 0);
    ~Input();

private slots:
    void showEvent(QShowEvent *);
    void on_toggle_answer_button_clicked();

    void on_input_text_edit_textChanged();

    void on_return_button_clicked();

private:
    Ui::Input *ui;
    bool is_answer_show;
    QSqlDatabase db;
    QString tip;
    QString answer;
};

#endif // INPUT_H
